* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 			Economic Policy Uncertainty and Presidential Approval:            *
* 						Evidence from Latin America                           * 
*																			  *
* 					Authors: Myriam Gómez-Méndez & Erwin Hansen   (2021)      * 
*                                                                             *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                             Contents                                        *
*       Table 3  ................................................... 29       *
*                                                                             *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* Note: See Carlin and Hellwig (2019) for a description of the data.


set more 1
clear all

* Set custom directory
global path "C:\Users\Erwin Hansen\Dropbox\01 research\jackie\draft\submission\plos one\R&R\sent\datacode"
cd "${path}"
* Load data
use table3_data.dta, clear
sort countryid timevar

**********************************************************************************************************
***** Table 3: Economic Uncertainty and Presidential Approval in the Carlin and Hellwig (2019) Model *****
**********************************************************************************************************

xtpcse appappdis epu l.epu l.appappdis honeymoon scan08 qa_growth1 q_log_inflation i.ccode if e_growth~=., c(psar1) pair
eststo M1
xtpcse appappdis epu l.epu l.appappdis honeymoon scan08 qa_growth1 q_log_inflation q_dfa4 q_dfa2 i.ccode if e_growth~=., c(psar1) pair
eststo M2
xtpcse appappdis epu l.epu  l.appappdis honeymoon scan08 qa_growth1 q_log_inflation q_dfa4 q_dfa2 c.qa_growth1#c.q_dfa4 i.ccode if e_growth~=., c(psar1) pair
eststo M3
xtpcse appappdis epu l.epu l.appappdis honeymoon scan08 qa_growth1 q_log_inflation q_dfa4 q_dfa2 c.qa_growth1#c.q_dfa2 i.ccode if e_growth~=., c(psar1) pair
eststo M4
xtpcse appappdis  epu l.epu l.appappdis honeymoon scan08 qa_growth1 q_log_inflation ortneod i.ccode if e_growth~=., c(psar1) pair
eststo M5
xtpcse appappdis epu l.epu l.appappdis honeymoon scan08 qa_growth1 q_log_inflation ortneod c.qa_growth1#c.ortneod i.ccode if e_growth~=., c(psar1) pair
eststo M6
estout M1 M2 M3 M4 M5 M6, cells(b(star fmt(%9.3f)) se(par)) stats(N r2, fmt(%9.3f %9.0g)) legend label collabels(none) varlabels(_cons Constant) starlevels(+ 0.10 * 0.05 ** 0.01)


